#include "CHowToPlay.h"
#include "../CGame.h"
#include "CMainMenuState.h"
#include "..\Wrappers\CSGD_Direct3D.h"
#include "..\Wrappers\CSGD_DirectInput.h"
#include "..\Wrappers\CSGD_FModManager.h"
#include "..\Wrappers\CSGD_TextureManager.h"

CHowToPlay::CHowToPlay()
{

}

void CHowToPlay::Enter()
{

}

bool CHowToPlay::Input(void)
{

	CSGD_DirectInput* pDI = CSGD_DirectInput::GetInstance();
	
	if(pDI->KeyPressed(DIK_RETURN) ||  pDI->JoystickButtonPressed(2) )
	{

		CGame::GetInstance()->ChangeState(CMainMenuState::GetInstance());

	}
	return true;
	
}

void CHowToPlay::Update(float _fDT)
{

}

void CHowToPlay::Render(void)
{
	CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();
	CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();
	pD3D->Clear(0, 128, 128);
	pD3D->DeviceBegin();
	pD3D->SpriteBegin();

	//pTM->Draw(m_nCursorID, 1, m_nCursorIndex*20 + 30);

	pD3D->DrawTextA("How To Play State", 20, 10);
	
	pD3D->GetSprite()->Flush();
	pD3D->DeviceEnd();
	pD3D->SpriteEnd();

	pD3D->Present();
}

void CHowToPlay::Exit(void)
{
}

CHowToPlay::~CHowToPlay()
{
}